﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类dVesselModify
	/// </summary>
	[Serializable]
	public class dVesselModify : Entity 
	{ 
		 public dVesselModify() 
            : base("dVesselModify") 
        { 

        }


		#region Model
		private int _UID;
		private string _Code;
		private string _Name;
		private int? _FormID;
		private int? _View1ID;
		private int? _View2ID;
		private string _KeyFields;
		private string _Note;
		private bool? _IsDisable;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Code
		{
			get{ return _Code; }
			set
			{
				this.OnPropertyValueChange(_.Code,_Code,value);
				this._Code = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Name
		{
			get{ return _Name; }
			set
			{
				this.OnPropertyValueChange(_.Name,_Name,value);
				this._Name = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? FormID
		{
			get{ return _FormID; }
			set
			{
				this.OnPropertyValueChange(_.FormID,_FormID,value);
				this._FormID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? View1ID
		{
			get{ return _View1ID; }
			set
			{
				this.OnPropertyValueChange(_.View1ID,_View1ID,value);
				this._View1ID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? View2ID
		{
			get{ return _View2ID; }
			set
			{
				this.OnPropertyValueChange(_.View2ID,_View2ID,value);
				this._View2ID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string KeyFields
		{
			get{ return _KeyFields; }
			set
			{
				this.OnPropertyValueChange(_.KeyFields,_KeyFields,value);
				this._KeyFields = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsDisable
		{
			get{ return _IsDisable; }
			set
			{
				this.OnPropertyValueChange(_.IsDisable,_IsDisable,value);
				this._IsDisable = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.Code,
				_.Name,
				_.FormID,
				_.View1ID,
				_.View2ID,
				_.KeyFields,
				_.Note,
				_.IsDisable,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_Code,
				_Name,
				_FormID,
				_View1ID,
				_View2ID,
				_KeyFields,
				_Note,
				_IsDisable,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "Code":
                    this._Code = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Name":
                    this._Name = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FormID":
                    this._FormID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "View1ID":
                    this._View1ID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "View2ID":
                    this._View2ID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "KeyFields":
                    this._KeyFields = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsDisable":
                    this._IsDisable = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "Code":
                    return this._Code; 
				case "Name":
                    return this._Name; 
				case "FormID":
                    return this._FormID; 
				case "View1ID":
                    return this._View1ID; 
				case "View2ID":
                    return this._View2ID; 
				case "KeyFields":
                    return this._KeyFields; 
				case "Note":
                    return this._Note; 
				case "IsDisable":
                    return this._IsDisable; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","dVesselModify");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","dVesselModify","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Code = new Field("Code","dVesselModify","Code");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Name = new Field("Name","dVesselModify","Name");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FormID = new Field("FormID","dVesselModify","FormID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field View1ID = new Field("View1ID","dVesselModify","View1ID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field View2ID = new Field("View2ID","dVesselModify","View2ID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field KeyFields = new Field("KeyFields","dVesselModify","KeyFields");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","dVesselModify","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsDisable = new Field("IsDisable","dVesselModify","IsDisable");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","dVesselModify","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","dVesselModify","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","dVesselModify","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","dVesselModify","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","dVesselModify","ModifyDate");
		}
		#endregion

 
	}
}

